{extend name="public/base"}
{block name='main'}

<!-- 广告 -->
<div class="layui-container mb20">
  <div class="banner-wrap"><!--矩形广告位-->
  </div>
</div>
<!-- 广告 end-->
<!-- 主体开始 -->
<style type="text/css">
  .layui-nav-tree{width: 200px!important;}
</style>
<div class="layui-container fly-marginTop fly-user-main">
  {include file="ucenter/ucleft" /}
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>


  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li class="layui-this"> 我的收藏 </li>
      </ul>
      <!-- 内容开始 -->
      <div class="layui-tab-content" style="padding: 0;">
        <div class="layui-form">
          <table class="layui-table">
            <colgroup>
              <col width="">
              <col width="150">
              <col width="140">
              <col width="60">
              <col>
            </colgroup>
            <thead>
            <tr>
              <th>文档名称</th>
              <th>上传者</th>
              <th>发布时间</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody id="infolist">
            {mqcms:doc type="lists" uid="1" usertype="wysc" order="create_time desc" pagenum="15"}
            {volist name="data['list']" id="vo"}
                <tr>
                  <td><div class="icon {$vo.ext}"></div>
                    <a href="{:url('doc/doccon',array('id'=>$vo['id']))}">{$vo.title|msubstr=18,0}</a></td>
                  <td>{$vo.uid|getusername}</td>
                  <td>{$vo.create_time|fdate}</td>
                  <td><a href="javascript:;" data-uri="{:url('common/deloperate',array('id'=>$vo['id'],'type'=>2,'typeid'=>1,'uid'=>1))}"  id="delete">删除</a></td>
                </tr>
              {/volist}
            {/mqcms:doc}
            </tbody>
          </table>
        </div>
      </div>
      <!-- 内容结束 -->
      <!-- 分页 -->
      <div style="text-align: center;">
        <div class="laypage-main"> {$data['page']|raw} </div>
      </div>
      <!-- 分页结束 -->
    </div>
  </div>
</div>

<include file="public:footer" />
<script>
  layui.use(['form' ,'jquery'], function(){
    var form = layui.form , $ = layui.jquery ;

    //提交删除-单个
    $("tbody#infolist tr td #delete").click(function(data){
      var delurl = $(this).attr('data-uri');
      layer.confirm('删除将不能恢复，确认删除吗？', {btn: ['确认','取消']}, function(){
        $.post(delurl,function(res){
          if(res.status ==  1){
            layer.msg(res.msg,{time:1800},function(){
              location.reload();  //成功后刷新当前页
            });
          }else{
            layer.msg(res.msg,{time:1800});
            return false;
          }
        });
      }, function(){
        layer.msg('取消删除');
        return false;
      });
      return false;
    });

  });

</script>
<script>
  layui.cache.page = 'user';
  layui.config({
    base: '__PUBLIC__/theme/blueideal/mods/' //这里实际使用时，建议改成绝对路径
  }).extend({
    fly: 'index'
  }).use('fly');
</script>
<!-- 主体结束 -->
{/block}